<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{title}}</title>
    <link rel="stylesheet" href="/apps/css/bootstrap.min.css">
    <link rel="stylesheet" href="/apps/css/fontawesome-free-6.4.0-web/css/all.min.css">
    <style>
        .poster-container {
            max-width: 100%;
            padding: 20px 0;
        }
        .poster-preview {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        .qrcode-switch {
            position: fixed;
            bottom: 20px;
            left: 20px;
            background-color: white;
            padding: 10px 15px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            z-index: 100;
        }
        .download-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            padding: 10px 20px;
            border-radius: 50px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            z-index: 100;
        }
    </style>
</head>
<body>
    <div class="container poster-container">
        <div class="row justify-content-center">
            <div class="col-md-10 text-center">
                <div class="mb-4">
                    <img src="{{posterImage}}" alt="BCH2501海报" class="poster-preview">
                </div>
            </div>
        </div>
    </div>

    <!-- 切换码格式控件 
    <div class="qrcode-switch">
        <div class="form-check form-switch">
            <input class="form-check-input" type="checkbox" id="useWxacode" {{#if useWxacode}}checked{{/if}}>
            <label class="form-check-label" for="useWxacode">使用小程序码</label>
        </div>
        <button class="btn btn-sm btn-outline-primary mt-2" id="refreshBtn">刷新海报</button>
    </div>
    -->

    <!-- 下载按钮 -->
    <a href="/apps/tools/bch2501-poster/download{{#unless useWxacode}}?useWxacode=false{{/unless}}" class="btn btn-success btn-lg download-btn">
        <i class="fas fa-download me-2"></i> 保存海报
    </a>

    <script src="/apps/js/bootstrap.bundle.min.js"></script>
    <script>
        document.getElementById('refreshBtn').addEventListener('click', function() {
            const useWxacode = document.getElementById('useWxacode').checked;
            window.location.href = `/apps/tools/bch2501?useWxacode=${useWxacode}`;
        });
    </script>
</body>
</html> 
